import { defineConfig } from 'vite'
import vue from '@vitejs/plugin-vue'
import { resolve } from 'path'
import AutoImport from 'unplugin-auto-import/vite'
import Components from 'unplugin-vue-components/vite'
import { ElementPlusResolver } from 'unplugin-vue-components/resolvers'

export default defineConfig({
    resolve: {
        //配置路径别名
        alias: {
            '@': resolve(__dirname, 'src')
        }
    },
    server:{
        // host:"10.170.92.27",
        host:"192.168.0.106",
        port:5173,
        open:true,

    },
    plugins: [
        vue(),
        //ElementPlus按需引入
        AutoImport({
            resolvers: [ElementPlusResolver()]
        }),
        Components({
            resolvers: [ElementPlusResolver()]
        })
    ]
})
